package com.tuanzi.loan.business.service.family.impl;

import com.tuanzi.loan.business.repository.family.LoanLargeAmountVipBindRepository;
import com.tuanzi.loan.business.service.family.LoanLargeAmountVipBindService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.largeamount.LoanLargeAmountBindRequest;
import com.tuanzi.loan.vo.response.family.largeamount.LoanLargeAmountBindResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * User: liangZongXi
 * Create time: 11:48 2019/5/22
 * Description:
 */
@Debug
@Service
@Transactional
@Retryable(value = {RetryException.class})
public class LoanLargeAmountVipBindServiceImpl implements LoanLargeAmountVipBindService {

    private final LoanLargeAmountVipBindRepository loanLargeAmountVipBindRepository;

    @Autowired
    public LoanLargeAmountVipBindServiceImpl(LoanLargeAmountVipBindRepository loanLargeAmountVipBindRepository) {
        this.loanLargeAmountVipBindRepository = loanLargeAmountVipBindRepository;
    }

    @Override
    public Page<LoanLargeAmountBindResponse> list(PageSearcher<LoanLargeAmountBindRequest> pageSearcher) {
        return loanLargeAmountVipBindRepository.list(pageSearcher.getSearchCondition(), pageSearcher.getPageable());
    }
}
